To communicate between a central processing unit (CPU) and one or more disc drives of a computer system, a disc controller is employed. The disc controller communicates between the CPU and the disc drive.
In order to write information to and retrieve information from disk media of a disc drive, a format is employed. This format facilitates communication between the CPU and the disc drive.
A typical disc drive includes one or more platters (disk media). Either or both surfaces of a platter may be used as is known. For embedded servo systems, each platter's surface is divided into what are euphemistically termed data wedges and servo wedges. From servo wedge to servo wedge defines a data area, and a data area can have a number of data wedges. Each disk also is divided up by concentrically expanding rings known as tracks. If there is more than one platter in a disc drive, tracks in vertical alignment with one another (having the same track number) define a cylinder.
Between servo wedges, tracks contain data fields. Data fields, located in data wedges, are used for writing information to and reading information from disk media. If a data field is defective, it must be identified to prevent using it. A recording zone defines a set of contiguous cylinders used for storing and retrieving information.
Within tracks in the area of servo wedges are servo fields.
The disc controller controls positioning of the read/write head or heads for writing and accessing information on one or more platters. To locate information, a read/write head assembly is passed over the surface of a platter. Information recorded on the platter surface is used for identifying where the head assembly is in relation to a location on the platter. This information is stored in servo fields, and may be stored in headers written at predefined locations on the disk for systems with headers.
Data that a CPU instructs a disc controller to store in a disc drive is first stored in a buffer memory by the disc controller. The controller then reads the buffer memory and writes the data to an address specified by the CPU on disk media. Data which the CPU is to retrieve from the disk media is also retrieved into buffer memory by the disc controller first before being transferred elsewhere in the computer system. Also, information used for address translation is retrieved from reserved tracks on disc media and stored in buffer memory.
To write or retrieve information from a disc drive, a CPU specifies an address on the hard disk. For example, by specifying hard disk cylinder-head-sector (CHS), the CPU provides an address where data is to be found or stored. However, many hard disk media formats are not compatible with some host systems. Consequently, disk drive software often emulates format of the disk media. This emulation is termed logical disc geometry to differentiate it from physical or actual geometry. In this manner, virtual or logical addressing to a disk drive may be employed in order to facilitate compatibility. Some host systems provide only a logical address independent of any geometry; the logical address is called a logical block address (LBA). Consequently, a logical to physical address conversion must take place in order to access or store information on a disk drive.
The more translation required, the more overhead (time or bandwidth) is needed in order to read or write information to a disk drive. The host computer system generally does not have sufficient bandwidth to perform these tasks nor does it generally have sufficient information. Consequently, a local microprocessor is employed on the disc drive. For cost competitive reasons, this local microprocessor is often of limited capability. As such, it may not have sufficient bandwidth to perform address translation at a rate, given other tasks it must perform, which would not be too bandwidth limiting to the disc controller.
Also, different systems will provide different types of addressing. For example, a CPU may supply through a host interface either a logical CHS (LCHS) or a logical block address (LBA). In either case, it is necessary that the disc controller be able to translate the received address into a physical address for accessing the disk drive.
Also, it is likely that there will be defective sectors on a drive. Consequently, the disc controller will need to provide defect management in combination with logical to physical address translation.
The present invention provides method and apparatus for converting a logical address to a physical address with defect management.